import React from 'react'

import StartFlash from './components/StartFlash/StartFlash';

import HoverNav from './components/HoverNav/HoverNav';

import navItems from 'model/navItems';

//import FreeScrollBar from 'react-free-scrollbar'; 

export default React.createClass({
    getInitialState() {
        return{
            playFlash: true 
        }
    },
    componentDidMount() { 
        setTimeout(function () {
            this.setState({
                playFlash: false
            })  ;  
        }.bind(this),2600);
    },
    render() {
        return (
            <div className="app">
                {
                    this.state.playFlash ? <StartFlash/> : null
                }
                <div className="topbar">
                    <HoverNav navOption={navItems} nowPath={this.props.location.pathname}/>
                    <div className="hover-down"></div>
                </div>
                <div className="content">
                    {this.props.children}
                </div>
                <div className="stars">
                    <div className="twinkling"></div>
                    <div className="galaxy"></div>
                </div>
            </div>
        )
    }
})
